package cn.edu.nju.oraldefense.action;

import javax.annotation.Resource;

import org.apache.struts2.json.annotations.JSON;

import cn.edu.nju.oraldefense.model.Graduate;
import cn.edu.nju.oraldefense.service.GraduateService;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

/**
 * 完成分配导师
 * @author ZhangZu
 *	
 */
public class GraduateAssignTutorAction extends ActionSupport {

	private GraduateService graduateService;
	private boolean success;

	@JSON(serialize = false)
	public GraduateService getGraduateService() {
		return graduateService;
	}

	@Resource
	public void setGraduateService(GraduateService graduateService) {
		this.graduateService = graduateService;
	}

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public String execute() {
		success = graduateService.assignTutor();
		return SUCCESS;
	}

}
